package ForthQuestion;

import java.util.List;

/**
 * @author cyt
 * @date 2020/6/14
 */
public class SearchStudent {
    //根据学号查找学生
    public static Student searchStudent(List<Student> studentList, int studentNum){
        for(Student s : studentList){
            if(s.getStudentNum() == studentNum){
                return s;
            }
        }
        return null;
    }
}
